package com.byit.controller;

import com.byit.service.IAppKeywordsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * 修改搜索词的搜索次数
 *
 * @author tjm
 * @date 2019/1/15.
 */
@Component
@Slf4j
public class SearchWordsAsync {

    @Autowired
    private IAppKeywordsService keywordsService;
    /**
     * 搜索次数加一
     */
    @Async
    public void addSearchNum(String content){
        try {
            keywordsService.addSearchNum(content);
        }catch (Exception e){
            log.error(e.getMessage());
        }
    }

}
